home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sources.unix
- From: rogers@amadeus.wr.tek.com (Roger S. Southwick)
- Subject: v25i100: hostcvt
- Sender: sources-moderator@pa.dec.com
- Approved: vixie@pa.dec.com
-
- Submitted-By: rogers@amadeus.wr.tek.com (Roger S. Southwick)
- Posting-Number: Volume 25, Issue 100
- Archive-Name: hostcvt.pch1
-
- This Official type patch is for the hostcvt program (v25i093) I submitted.
- By default, the hostcvt program removes duplicated entries as it converts
- for /etc/hosts format to DNS format. The patch adds a -k flag which keeps
- duplicated entries rather than removing them.
-
- Feed this to the stdin of Larry Wall's fine patch program (I've tested with
- patch version 2.0.1.6 Patch level: 12) and enjoy the results.
-
- rogers@fangorn.wr.tek.com (Roger S. Southwick)
- UUCP: ...!uunet!tektronix!fangorn.wr.tek.com!rogers
- ARPA: <rogers%fangorn.wr.tek.com@RELAY.CS.NET>
-
-
- Index: main.c
- Prereq: 1.4
- 11,12c11
- < static char *RCSid = "$Id: main.c,v 1.4 91/11/25 17:46:06 rogers Release $";
- <
- ---
- > static char *RCSid = "$Id: main.c,v 1.5 91/12/07 16:51:15 rogers Release $";
- 64c63
- < int hostflag, soaflag, netflag, errflag, outputflag, domainflag;
- ---
- > int hostflag, soaflag, netflag, errflag, outputflag, domainflag, kflag;
- 66c65
- < hostflag = soaflag = netflag = errflag = outputflag = domainflag = 0;
- ---
- > kflag = hostflag = soaflag = netflag = errflag = outputflag = domainflag = 0;
- 70c69
- < while ((ch = egetopt(argc, argv, "h:n:o:s:")) != -1)
- ---
- > while ((ch = egetopt(argc, argv, "kh:n:o:s:")) != -1)
- 111a111,114
- > case 'k': /* Keep the conflicting entries */
- > kflag++;
- > break;
- >
- 112a116
- > default:
- 114c118
- <
- ---
- > break;
- 174c178
- < if (isdup(hp)){
- ---
- > if (!kflag && isdup(hp)){
- Index: hostcvt.8
- Prereq: 1.2
- 2c2
- < .\" $Id: hostcvt.8,v 1.2 91/11/25 17:45:24 rogers Release $
- ---
- > .\" $Id: hostcvt.8,v 1.3 91/12/07 16:56:22 rogers Release $
- 9,12c9,14
- < [ -s
- < .I soabasefile
- < ] [ -n
- < .I netfile
- ---
- > [
- > .I -k
- > ] [
- > .I "-s soabasefile"
- > ] [
- > .I "-n netfile"
- 14,16d15
- < [ -h
- < .I hostfile
- < ]
- 18,19c17,20
- < [ -o
- < .I outputfile
- ---
- > [
- > .I "-h hostfile"
- > ] [
- > .I "-o outputfile"
- 46c47,53
- < to be in the outputfile and the reverse table files. Lines in
- ---
- > to be in the outputfile and the reverse table files. If the
- > .I -k
- > option is specified,
- > .B hostcvt
- > will keep these entries and not issue any warnings.
- > .LP
- > Lines in
- 51a59,61
- > .TP
- > .BI \-k
- > Keep the dupliacted names in the resulting output files.
-